package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdaDemo1 {
    public static void main(String[] args) {
        FileFilter filter = new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return pathname.getName().contains("D");
            }
        };

        FileFilter filter1 = (File pathname)-> {
                return pathname.getName().contains("f");
        };

        FileFilter filter2 = (pathname)-> {
            return pathname.getName().contains("f");
        };

        FileFilter filter3 = (file1)-> file1.getName().contains("s");

        FileFilter filter4 = f->f.getName().contains("s");

        File dir = new File("src/main/java/file");
        File[] subs = dir.listFiles(f->f.getName().contains("q"));



    }
}

